package com.tlgen.orm.model;

/**
 * 属性字段、属性字段上的模型关联注解(Association、Collection)类型、注解中属性值
 */
public class RelationParams {

    /**
     * 主表实体类类型
     */
    private Class<?> masterClass;

    /**
     * 字段属性名
     */
    private String columnName;

    /**
     * 属性的类型
     */
    private String columnType;

    /**
     * 字段属性值
     */
    private String columnValue;

    /**
     * 注解类型
     */
    private String relationType;

    /**
     * 注解中核心参数值
     */
    private String relationName;

    /**
     * 如果是一对多, 保存中间表类型
     */
    private Class<?> relationClass;

    public Class<?> getMasterClass() {
        return masterClass;
    }

    public void setMasterClass(Class<?> masterClass) {
        this.masterClass = masterClass;
    }

    public String getColumnName() {
        return columnName;
    }

    public void setColumnName(String columnName) {
        this.columnName = columnName;
    }

    public String getColumnType() {
        return columnType;
    }

    public void setColumnType(String columnType) {
        this.columnType = columnType;
    }

    public String getRelationType() {
        return relationType;
    }

    public String getColumnValue() {
        return columnValue;
    }

    public void setColumnValue(String columnValue) {
        this.columnValue = columnValue;
    }

    public void setRelationType(String relationType) {
        this.relationType = relationType;
    }

    public String getRelationName() {
        return relationName;
    }

    public void setRelationName(String relationName) {
        this.relationName = relationName;
    }

    public Class<?> getRelationClass() {
        return relationClass;
    }

    public void setRelationClass(Class<?> relationClass) {
        this.relationClass = relationClass;
    }

    @Override
    public String toString() {
        return "RelationParams{" +
                "masterClass='" + masterClass + '\'' +
                ", columnName='" + columnName + '\'' +
                ", columnType='" + columnType + '\'' +
                ", columnValue='" + columnValue + '\'' +
                ", relationType='" + relationType + '\'' +
                ", relationName='" + relationName + '\'' +
                ", relationClass=" + relationClass +
                '}';
    }
}
